Page({
  data: {
    statusBarHeight: 0,
    menuButtonRect: null,
    sysInfo: null
  },
  onLoad() {
    const sysInfo = wx.getSystemInfoSync();
    const menuButtonRect = wx.getMenuButtonBoundingClientRect();
    this.setData({
      statusBarHeight: sysInfo.statusBarHeight,
      menuButtonRect,
      sysInfo
    });
    console.log('首页加载完成')
  },
  onShow() {
    console.log('首页显示')
  },
  onHide() {
    console.log('首页隐藏')
  },
  onMenuTap() {
    wx.showToast({ title: '菜单点击', icon: 'none' });
  }
}) 